home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / dietdisc.zip / DIETOFF.C < prev    next >
C/C++ Source or Header  |  1991-02-10  |  528b  |  26 lines

  1.  
  2. #include <stdio.h>
  3. #include <dos.h>
  4.  
  5. unsigned int diet_cs = 0;
  6. int far *diet_flag_ptr;
  7.  
  8. void    main(int argc, char *argv[])
  9.         {
  10.         _AX = 0x3341;
  11.         geninterrupt(0x21);
  12.         if (_DX == 0x1234)
  13.             diet_cs = _CX;
  14.  
  15.         if (diet_cs == 0)
  16.             printf("Diet Disk not loaded.\n");
  17.         else
  18.             {
  19.             diet_flag_ptr = MK_FP(diet_cs, 0x0103);
  20.             *diet_flag_ptr = 2;
  21.             printf("Diet Disk is now disabled.\n");
  22.             }
  23.         }
  24.  
  25.  
  26.